package com.black.app.service.exercise;

import com.black.app.domain.exercise.AppExerciseSeries;
import com.baomidou.mybatisplus.extension.service.IService;
import com.black.app.domain.req.exercise.add.AppExerciseSeriesAddReq;
import com.black.app.domain.req.exercise.edit.AppExerciseSeriesEditReq;
import com.black.app.domain.req.exercise.query.AppExerciseSeriesQueryReq;
import com.black.app.domain.resp.exercise.AdminExerciseSeriesResp;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
* @author L
* @description 针对表【app_exercise_series(锻炼系列)】的数据库操作Service
* @createDate 2024-10-23 16:57:08
*/
public interface AppExerciseSeriesService extends IService<AppExerciseSeries> {

    /**
     * 根据tid 查询前2个
     * @param typeId
     * @return
     */
    PageInfo<AppExerciseSeries> findByTidTop2(Long typeId);

    /**
     * 根据tid 查询全部
     * @param typeId
     * @return
     */
    List<AppExerciseSeries> findByTidAll(Long typeId);

    /**
     * 根据id查询
     * @param sId
     * @return
     */
    AdminExerciseSeriesResp findById(Long sId);

    /**
     * 分页查询-后台
     * @param req
     * @return
     */
    PageInfo<AdminExerciseSeriesResp> paginationQuery(AppExerciseSeriesQueryReq req);

    /**
     * 删除系列
     * @param ids
     * @return
     */
    boolean deleteById(Long[] ids);

    /**
     * 新增系列
     * @param req
     * @return
     */
    boolean add(AppExerciseSeriesAddReq req);

    /**
     * 修改系列
     * @param req
     * @return
     */
    boolean edit(AppExerciseSeriesEditReq req);
}
